package com.agileboot.attendance.common.enums;

import com.agileboot.common.enums.BasicEnum;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 加班状态枚举
 */
@Getter
@AllArgsConstructor
public enum OvertimeStatusEnum implements BasicEnum<String> {

    PENDING("0", "待审批"),
    APPROVED("1", "已批准"),
    REJECTED("2", "已拒绝"),
    CANCELLED("3", "已取消");

    private final String value;
    private final String description;

    @Override
    public String getValue() {
        return value;
    }

    @Override
    public String description() {
        return description;
    }

    public static String getDescriptionByValue(String value) {
        for (OvertimeStatusEnum status : values()) {
            if (status.getValue().equals(value)) {
                return status.description();
            }
        }
        return "";
    }
} 